package com.link.gateway.base.duty.service;

import com.link.gateway.base.auth.model.Authclient;
import com.link.gateway.base.duty.dao.mybatis.mapper.DutyMapper;
import com.link.gateway.base.duty.model.Duty;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

@Service
public class DutyServiceImpl implements DutyService {

    @Resource
    private DutyMapper dutyMapper;

    @Override
    public List<String> queryClientByDutyId(Long dutyId) throws Exception {
        Duty duty = new Duty();
        duty.setId(dutyId);
        return dutyMapper.queryClientByDutyId(duty);
    }

    @Override
    public List<Long> queryDutyByCientId(String clientId) throws Exception {
        Authclient authclient = new Authclient();
        authclient.setClientId(clientId);
        return dutyMapper.queryDutyByCientId(authclient);
    }
}
